package yf.mall.vo.down;


import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.*;
import java.io.Serializable;



import yf.mall.entity.DocDownEntity;
import yf.mall.vo.DocDownVo;

                        import yf.mall.enums.DocDownStatusEnum;

/**
 * 文档下载实体
 * 表名 doc_down
 *
 *
 *
 * @date Tue Dec 22 10:37:47 CST 2020
 */
@Data
public class DocDownDown implements Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

                        //
            @ExcelProperty("")
            private Long id;
        
                        //商品id
            @ExcelProperty("商品id")
            private Long goodsId;
        
                        //文档名称
            @ExcelProperty("文档名称")
            private String name;
        
                        //文档链接
            @ExcelProperty("文档链接")
            private String linkRef;
        
                        //上传时间
            @ExcelProperty("上传时间")
            private Date time;
        
                        //ENUM-状态:"yes-已通过","no-待审核"
            @ExcelIgnore
            private Integer status;
                        @ExcelProperty("状态")
            private String statusStr;
        
    
    public DocDownDown() {

    }

    public DocDownDown(DocDownVo vo) {
        DocDownEntity entity = vo.getEntity();
                                    this.setId(entity.getId());
            
                                    this.setGoodsId(entity.getGoodsId());
            
                                    this.setName(entity.getName());
            
                                    this.setLinkRef(entity.getLinkRef());
            
                                    this.setTime(entity.getTime());
            
                                    this.setStatus(entity.getStatus());
                if(entity.getStatus()!=null){
                    this.setStatusStr( DocDownStatusEnum.indexOf(entity.getStatus()));
                }
            
            }


}
